<template>
	
	<form @submit="submit" :data-action="`/api/daliyRecord/save?stationId=${param.id}&x.daliyItemsId=${param.itemId}&x.isNormal=${isNormal}`">
			<!-- <navigator :url="`/pages/daliyRecord/daliyRecordList?id=${param.id}&itemId=${param.itemId}&title=${param.title}&content=${param.content}`" class="btn line block rds23 mt15" hover-class="op9">
				查看记录
			</navigator> -->
			<navigator :url="`/pages/daliyRecord/daliyRecordList?id=${param.id}&itemId=${param.itemId}&title=${param.title}&content=${param.content}`" class="whiteBg pd10 fz12 grey middle">
				<view class="fixAutoNoPd">
					<view>
						{{param.content}}
					</view>
					<view class="w70">
						<view class="flex rt grey">
							<view class="mr5">查看记录</view>
							<view class="sIcon-arrowRight"></view>
						</view>
					</view>
				</view>
			</navigator>
			<view class="grayBg pd5"></view>
			
			<view class="pd10 plr15 bb">
				<view class="ho">
					<textarea class="item" name="x.remark" placeholder="请输入备注……" />
				</view>
			</view>
			
			<view class="father ">
				<view class="fixAuto  middle plr15">
					<view class="w80">
						是否正常
					</view>
					<view class="item ">
						<view class="flex rt">
							<view>
								<switch :checked="isNormal" @change="isNormal=$event.detail.value" color="#3385ff"/>
							</view>
						</view>
					</view>
				</view>
			</view>
			
			
			<view class="plr30  fixed bottom pb100">
				<button form-type="submit" class="btn gradualBg block rds23 shadow">
					保存记录
				</button>
				
			</view>
			
		</form>

	</layout>
</template>

<script>
	export default {
		data() {
			return {
				param:{id:"",itemId:"",content:""} ,
				isNormal:true 
			}
		},
		onLoad(params) {
			this.param = params ;
			uni.setNavigationBarTitle({
				title:params.title
			})
		},
		methods: {
			
			submit:function(e){
				this.form.submit(e , this.success);
			},
			
			success:function(e){
				this.kit.goSuccessBack("保存成功");
			}
		}
	}
</script>
<style>
	page{
		background-color: #fff;
	}
</style>